<template>
  <!-- 加载动画 -->
  <div id="loading">
    <van-loading
      :color="globalObj.normColor"
      v-show="loadingShow"
      class="loading"
      size="60"
    />
    <van-overlay :show="loadingShow" class-name="overlay" />
  </div>
</template>

<script>
export default {
  name: "loading",
  props: {
    loadingShow: {
      type: Boolean,
      default: false,
    },
  },
  data() {
    return {};
  },
};
</script>

<style scoped>
.loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
}
.overlay {
  background: rgba(255,255, 255, 0.1);
}
</style>